﻿#ifndef COALFORM_H
#define COALFORM_H

#include <QWidget>
#include <QtCharts>
#include <QValueAxis>
#include <QLineSeries>
#include <QDateTimeAxis>
#include "AiPtuStruct.h"

namespace Ui
{
    class CoalForm;
}

class CoalForm : public QWidget
{
    Q_OBJECT

public:
    explicit CoalForm(QWidget* parent = nullptr);
    ~CoalForm();

    void onCoalSpdParam(QJsonObject);

    void onGetColidarPileCoalParam(QJsonObject obj);

    void onRealtimeImage(WsBinHeader header, QByteArray image);

    void onCoalSpdValue(QJsonObject);



    void onAlarmImage(WsBinHeader header, QByteArray image, AlarmExtern alarmExtern);

private slots:

    void on_btn_draw_clicked(bool checked);

    void on_btn_drawclear_clicked();

    void on_btn_getparam_clicked();

    void on_btn_setparam_clicked();

    void on_btn_baseline_clicked();

    void on_btn_RealTimeImage_clicked(bool checked);


    void on_btn_debug_clicked();


    void on_checkBox_stateChanged(int arg1);

    void on_btn_coalimage_clicked();

signals:
    void sigSendParam(QString method, QJsonObject body);
private:
    Ui::CoalForm* ui;

    QChart* m_chart;
    QValueAxis* m_vAxisY;
    QDateTimeAxis* m_dateAxisX;
    QLineSeries* m_series;

    bool m_firIn;
    QString m_chnid;
    bool show_alarmExtern;
    QTimer* m_timer;
    QTimer* m_timer_2;
};

#endif // COALFORM_H
